<?php 
    $conn = oci_connect("hospital", "hospital", "//localhost/XE"); 
	$pull = oci_parse($conn, "select opera_id from operation where opera_id = $_POST[opera_id]");
	$total = 0;
	oci_execute($pull);
	$total = oci_fetch_all($pull,$result);
	
	if( $total != 0){
		echo "This  ID  already have";
	}else{
		
		$add = oci_parse($conn, "INSERT INTO operation VALUES('$_POST[opera_id]','$_POST[id]','$_POST[sur]','$_POST[nur]','$_POST[ane]','$_POST[charges]','$_POST[op_room]','$_POST[pa_room]','$_POST[hr]')");
		oci_execute($add);
	}
 ?>
 
<html>
<head><meta http-equiv="refresh" content="1; URL=main.php"></head>
<BODY bgcolor = "#ffffff">
 <font color="#ffffff" size="20">Redirecting ...</font>
 </body>
 </html>